LearningSession.MoveToActivity Method (string)

Makes the selected activity the current activity.

Parent Type: LearningSession

Namespace: Microsoft.LearningComponents

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public virtual void MoveToActivity (
string activityKey

)

Parameters

activityKey

The id from the manifest corresponding to the activity to become the current activity.

Exceptions
Exception type Condition
ArgumentNullException

Thrown if activityKey is null.

ArgumentOutOfRangeException

Thrown if activityKey is an empty string.

SequencingException

Thrown if the activityKey cannot become the current activity to restrictions in the sequencing rules of the package.

InvalidOperationException

Thrown if the current state of the session does not allow moving to the selected activity or if the activity does not exist in the package.

Remarks

In the process of navigation, the current activity may be exited before the navigation command is able to complete. If the navigation command then throws a SequencingException, the state of the session is undefined. The current activity may have changed during this process.